<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        // put your code here
        $nombre1 = 123;
        $nombre2 = rand(0,999);
        $cpt =0;
        while ($nombre1 != $nombre2) {
            $nombre2 = rand(0,999); 
            $cpt++;
        } 
        echo"$cpt<br>";
       
        
       for($x=0; $nombre2 != $nombre1; $x++) {
           $nombre2 = rand(0,999);
       }
           echo"$x<br>";
         
         
            
    
        ?>
    </body>
</html>
